import request from "@/utils/request"


const getUserList = async (page: number, size: number) => {
    return request.get<UserInfo[]>("/user/list", { page: page, size: size })
}

const addUser = async (req: UserAddRequest) => {
    return request.post<null>("/user/add", req)
}

const deleteUser = async (id: string) => {
    return request.delete<null>("/user/delete", { id: id })
}

const updateUser = async (req: UserUpdateRequest) => {
    return request.post<null>("/user/update", req)
}

export { getUserList, addUser, deleteUser, updateUser }